; NOTE: Assertions have been autogenerated by utils/update_test_checks.py
; RUN: opt < %s -passes=slp-vectorizer -S -mtriple=x86_64-unknown-linux-gnu -mattr=+avx2 -slp-max-reg-size=128 | FileCheck %s

define void @inst_size(ptr %a, <2 x i64> %b) {
; CHECK-LABEL: @inst_size(
; CHECK-NEXT:  entry:
; CHECK-NEXT:    [[VAL:%.*]] = extractelement <2 x i64> [[B:%.*]], i32 0
; CHECK-NEXT:    [[TMP1:%.*]] = load <4 x i64>, ptr [[A:%.*]], align 4
; CHECK-NEXT:    [[T41:%.*]] = icmp sgt i64 0, [[VAL]]
; CHECK-NEXT:    [[TMP2:%.*]] = icmp sgt <4 x i64> zeroinitializer, [[TMP1]]
; CHECK-NEXT:    br label [[BLOCK:%.*]]
; CHECK:       block:
; CHECK-NEXT:    [[PHI1:%.*]] = phi i1 [ [[T41]], [[ENTRY:%.*]] ]
; CHECK-NEXT:    [[TMP3:%.*]] = phi <4 x i1> [ [[TMP2]], [[ENTRY]] ]
; CHECK-NEXT:    ret void
;
entry:
  %val = extractelement <2 x i64> %b, i32 0
  %tmpl1 = load i64, ptr %a, align 4
  %ptr2 = getelementptr inbounds i64, ptr %a, i64 1
  %tmpl2 = load i64, ptr %ptr2, align 4
  %ptr3 = getelementptr inbounds i64, ptr %a, i64 2
  %tmpl3 = load i64, ptr %ptr3, align 4
  %ptr4 = getelementptr inbounds i64, ptr %a, i64 3
  %tmpl4 = load i64, ptr %ptr4, align 4
  %t41 = icmp sgt i64 0, %val
  %t42 = icmp sgt i64 0, %tmpl1
  %t43 = icmp sgt i64 0, %tmpl2
  %t44 = icmp sgt i64 0, %tmpl3
  %t45 = icmp sgt i64 0, %tmpl4
  br label %block
block:
  %phi1 = phi i1 [ %t41, %entry]
  %phi2 = phi i1 [ %t42, %entry]
  %phi3 = phi i1 [ %t43, %entry]
  %phi4 = phi i1 [ %t44, %entry]
  %phi5 = phi i1 [ %t45, %entry]
  ret void
}
